<?php
/**
 * ClassName: recuperate
 * Description: 调理记录控制器
 * @Author 周昌
 * @Create 2023/12/19 15:36
 */

namespace app;



use epii\server\Args;
use model\RecuperateModel;
use service\admin\RecuperateService;

class recuperate extends base
{
    public function init()
    {
        parent::init();
        $this->accessDenied();
    }
    //问诊(病历)下 调理记录 添加/修改
    public function add_edit(){
        $case_id=Args::params('case_id/d');
        if(Args::isPost()){
            $data=Args::params('r');
            $this->validate($data,[
                'content|症状变化分析'=>'require|max:300'
            ]);
            $res=RecuperateService::addEdit($case_id,$data);
            $res['code']?$this->success($res['msg'],'refresh'):$this->error($res['msg']);
        }
        $this->_as_info= RecuperateModel::getInfo(['case_id'=>$case_id]);
        $this->_as_case_id= $case_id;
        $this->adminUiDisplay();

    }


}